package org.vectrics.history;

import java.util.Date;
import org.vectrics.history.Activity;
import org.vectrics.user.Person;
import org.apache.log4j.Logger;

/**
 * This class represents one Activity that can be tracked as part of an
 * objects history.
 * @author Mike Moore
 *
 */
public class Activity {
	private transient static Logger log = Logger.getLogger(Activity.class);
	private String objectType = null;
	private String objectId = null;
	private String childObjectId = null;
	private Date date = null;
	private ActivityType activityType = null;
	private String description;
	private Long uid = null;
	private Person person = null;


	/**
	 */
	public Activity() {
		super();
		setDate(new Date());
	}
	
    /**
     * The person who performs the activity.
     * @return Returns the person.
     */
    public Person getPerson() {
        return person;
    }
    
    /**
     * @param person The person to set.
     */
    public void setPerson(Person person) {
        this.person = person;
    }
	
    /**
	 * @return
	 */
	public static Logger getLog() {
		return log;
	}

	/**
	 * @param log
	 */
	public static void setLog(Logger log) {
		Activity.log = log;
	}

    /**
     * @return Returns the activityType.
     */
    public ActivityType getActivityType() {
        return activityType;
    }
    /**
     * @param activityType The activityType to set.
     */
    public void setActivityType(ActivityType activityType) {
        this.activityType = activityType;
    }
	/**
	 * @return
	 */
	public Date getDate() {
		return date;
	}

	/**
	 * @param date
	 */
	public void setDate(Date date) {
		this.date = date;
	}

	/**
	 * @return
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param description
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @return
	 */
	public String getObjectType() {
		return objectType;
	}

	/**
	 * @param objectType
	 */
	public void setObjectType(String objectType) {
		this.objectType = objectType;
	}


	public Long getId() {
		return uid;
	}

	public void setId(Long uid) {
		this.uid = uid;
	}


    /**
     * @return Returns the childObjectId.
     */
    public String getChildObjectId() {
        return childObjectId;
    }
    /**
     * @param childObjectId The childObjectId to set.
     */
    public void setChildObjectId(String childObjectId) {
        this.childObjectId = childObjectId;
    }
    /**
     * @return Returns the objectId.
     */
    public String getObjectId() {
        return objectId;
    }
    /**
     * @param objectId The objectId to set.
     */
    public void setObjectId(String objectId) {
        this.objectId = objectId;
    }
    
    
}
